<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>操作样式</title>
    <script src="C:\Users\86198\Desktop\yl-dsj\jquery-3.6.0.min.js" type="text/javascript"></script>
    <style type="text/css">
        .baseClass{background-color: #DDD;}
        .focusClass{background-color: #FFF;border: 2px dotted #FF0000;}
        .inverseColor{color: #FFF;background-color: #000;}
    </style>
</head>
<body>
    <img src="images\02.jpg" /><hr/>
    <input type="botton" value="放大图片" onClick="enlargeImage()"/>
    <input type="button" value="缩小图片" onClick="lessenImage()" />
    <script type="text/javascript">
      function enlargeImage(){
          $("img").css({
              width:function(index,value){
                  return parseFloat(value) * 1.1;
              },
              height:function(value) {
                  return parseFloat(value) * 1.1;
              }
          });
      }
        function lessenImage(){
            $("img").css({
              width:function(index,value){
                  return parseFloat(value) * 0.9;
              },
              height:function(value) {
                  return parseFloat(value) * 0.9;
              }
          });
          
        }

    </script>
</body>
</html>